Jetbrains - Fix autocomplete statusbar reflect#5240
Merged
catrielmuller merged 1 commit intomainfrom Jan 20, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 6d297fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Summary: This PR fixes JetBrains autocomplete by updating type signatures in
The changes are well-structured and the test file correctly uses |
markijbema
approved these changes
Jan 20, 2026
This was referenced Jan 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This PR fixes an
IllegalArgumentException: argument type mismatcherror that occurred when enabling autocomplete (Ghost Provider) in the JetBrains plugin. The error was triggered when the Ghost service attempted to update the status bar with autocomplete information, causing the plugin to crash and preventing users from using the autocomplete feature.The root cause was a type mismatch in the RPC communication between the VSCode extension host and the JetBrains plugin. When the Ghost service set the status bar tooltip to a
MarkdownStringobject (as per VSCode's API), it was serialized and sent to the JetBrains side, but the receiving method expected a simpleString?type, causing the reflection-based method invocation to fail.Implementation
The fix involved updating the type signatures in
MainThreadStatusBarShape.ktto be more flexible and align with VSCode's StatusBarItem API:Key Changes:
Changed
tooltipparameter type fromString?toAny?MarkdownStringobjectsMarkdownStringis used, it gets serialized as a Map with properties likevalue,isTrusted,supportThemeIcons,supportHtml, andurisAny?type allows the method to accept both simple strings and serialized MarkdownString objectsChanged
accessibilityInformationparameter type fromBoolean?toAny?labelandroleproperties, not a BooleanAny?to match the actual API contractAdded
extractTooltipText()helper methodvalueproperty from the MapCreated comprehensive test coverage
ReflectUtilsStatusBarTest.ktwith tests for:How to Test
Alternative Test (if you don't have autocomplete credits):
test setEntry with MarkdownString-like tooltip objecttest